<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="static/css/default.css"
	media="all" />
<link rel="stylesheet" type="text/css" href="static/css/layout.css"
	media="all" />
<link rel="stylesheet" type="text/css" href="static/css/general.css" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.theme.css" media="all" />
<link rel="stylesheet" type="text/css" href="static/css/jquery.core.css"
	media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.datepicker.css" media="all" />

<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.button.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.resizable.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.dialog.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.tooltip.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.tooltip.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.menu.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.override.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/jquery.ui.tab.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="static/css/list_favorite.css" media="all" />

<link rel="stylesheet" type="text/css" href="static/css/user-own.css"
	media="all" />
<link rel="stylesheet" type="text/css" href="static/css/profile.css"
	media="all" />
<script type='text/javascript' src='static/js/jquery.min.js'></script>
<script type='text/javascript' src='static/js/menu.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.core.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.widget.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.datepicker.js'></script>

<script type='text/javascript' src='static/js/jquery.ui.button.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.draggable.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.mouse.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.position.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.resizable.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.dialog.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.tooltip.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.tab.js'></script>
<script type='text/javascript' src='static/js/jquery.ui.menu.js'></script>
<script src="http://malsup.github.com/jquery.form.js"></script>
<script type='text/javascript' src='static/js/general.js'></script>
<script type='text/javascript' src='static/js/profile.js'></script>
</head>
<body>
	<div class="body">
		<div class="header">
			<div class="float-left text-left login">
				<span>Welcome lampart.com.</span> <a id="signin" class="sign-in"
					href="index.php?c=logout">Sign out</a>
			</div>

		</div>
		<div class="search">
			<div class="social-connect"></div>
			<div class="logo">
				<a href="#" title="">Lampart.com</a>
			</div>
			<div class="search-control">
				<form action="index.php?c=search" method="get" id="search_control">
					<div class="search-category">
						<div id="search_title" class="search-title">
							<span id="search_category_title" style="font-size: 10px;">All </span>
							<img src="images/arrow_down.png" />
						</div>
						<ul id="search_menu" class="search-menu">
							<li id="0" class="menu-option">All</li>
							<li id="1" class="menu-option">Male</li>
							<li id="2" class="menu-option">Female</li>
						</ul>
					</div>
					<input type="hidden" id="search_controller" value="search" name="c" />
					<input type="hidden" id="search_sex" value="" name="search[sex]" />
					<input type="text" name="search[name]" size="15" /> <input
						type="submit" id="search" name="search[search]" value="Search" />
				</form>
			</div>
		</div>
		<div class="content">
			<div class="left">
				<div class='header'>My profile</div>
				<div class="control">
					<a href="index.php">List favorite</a><br /> <a
						href="index.php?c=profile">Update profile</a><br /> <a
						href="index.php?c=profile&m=addavatar">Update avatar</a>
				</div>
				<div></div>
			</div>
			<div class="main-content">
				<div class="profile">
					<h2>
						<span class="header-page">Profile</span>
					</h2>
					<br />
					<div>
						<div class="main">
							<div class="image">
								<div id="text_picture">
									<img width='150px' height='150px'
										src="<?php echo!empty($this->userLog->picture) ? 'img/' . $this->userLog->picture : 'img/0.gif'; ?>" /><br />
								</div>
								<div id="picture" style='display: none;'>
									<input type='file' id='file' name='file' /> <input
										type='submit' value='submit' id='upload_picture'
										name='upload_picture' />
								</div>

								<a class='edit' id='edit_picture' href='#'>Edit</a> <a
									id="update_picture" class="update" href="#"
									style='display: none;'>Update</a>
							</div>
							<table>
								<tr>
									<td colspan='3' class="profile_detail"><span id='text_fullname'><?php echo!empty($this->userLog) ? $this->userLog->fullname : ''; ?>
									</span> <input type='text'
										value="<?php echo!empty($this->userLog) ? $this->userLog->fullname : ''; ?>"
										id="fullname" name="fullname" style='display: none;' /> <br />
										<a class='edit' id='edit_fullname' href='#'>Edit</a> <a
										id="update_fullname" class="update" href="#"
										style='display: none;'>Update</a>
									</td>
								</tr>
								<tr>
									<td class="profile_head">Username:</td>
									<td class="profile_detail" id='insert_username'><span
										id='text_username'><?php echo!empty($this->userLog) ? $this->userLog->username : ''; ?>
									</span> <input type='text'
										value="<?php echo!empty($this->userLog) ? $this->userLog->username : ''; ?>"
										id="username" name="username" style='display: none;' />
									</td>
									<td><a class='edit' id='edit_username' href='#'>Edit</a> <a
										id="update_username" class="update" href="#"
										style='display: none;'>Update</a>
									</td>
								</tr>
								<tr>
									<td class="profile_head">Email:</td>
									<td class="profile_detail" id='insert_email'><span
										id='text_email'><?php echo!empty($this->userLog) ? $this->userLog->email : ''; ?>
									</span> <input type='text'
										value="<?php echo!empty($this->userLog) ? $this->userLog->email : ''; ?>"
										id="email" name="email" style='display: none;' />
									</td>
									<td><a id='edit_email' class='edit' href='#'>Edit</a> <a
										id="update_email" class="update" href="#"
										style='display: none;'>Update</a>
									</td>
								</tr>
								<tr>
									<td class="profile_head">Sex:</td>
									<td class="profile_detail">
										<div id="text_sex">
											<?php echo!empty($this->userLog) ? $this->userLog->sex == 1 ? 'Male' : 'Female'  : ''; ?>
										</div>
										<div id="sex" style='display: none;'>
											<input type='radio' name='user[sex]' id='sex_male' value='1'
											<?php echo!empty($this->userLog) ? ($this->userLog->sex == 1 ? 'checked="checked"' : '') : ''; ?> />Male
											<input type='radio' name='user[sex]' id='sex_female'
												value='2'
												<?php echo!empty($this->userLog) ? ($this->userLog->sex == 2 ? 'checked="checked"' : '') : ''; ?> />Female
										</div>
									</td>
									<td><a id="edit_sex" class='edit' href='#'>Edit</a> <a
										id="update_sex" class="update" href="#" style='display: none;'>Update</a>
									</td>
								</tr>
								<tr>
									<td class="profile_head">Birthday:</td>
									<td class="profile_detail">
										<div id="text_birthday">
											<?php echo!empty($this->userLog) ? date('m-d-Y', strtotime($this->userLog->birthday)) : ''; ?>
										</div>
										<div id="birthday" style="display: none;">
											<?php list($month, $day, $year) = explode('-', date('m-d-Y', strtotime($this->userLog->birthday))); ?>
											<select id='month' name='user[month]'>
												<?php foreach (@$this->month as $key => $val): ?>
												<option
												<?php
												if (!empty($this->userLog)) {
													echo $key == $month ? "selected='selected'" : '';
												}
												?>
													value='<?php echo $key; ?>'>
													<?php echo $val; ?>
												</option>
												<?php endforeach; ?>
											</select> <select id='day' name='user[day]'>
												<?php foreach (@$this->day as $key => $val): ?>
												<option
												<?php
												if (!empty($this->userLog)) {
													echo $key == $day ? "selected='selected'" : '';
												}
												?>
													value='<?php echo $key; ?>'>
													<?php echo $val; ?>
												</option>
												<?php endforeach; ?>
											</select> <select id='year' name='user[year]'>
												<?php foreach (@$this->year as $key => $val): ?>
												<option
												<?php
												if (!empty($this->userLog)) {
													echo $key == $year ? "selected='selected'" : '';
												}
												?>
													value='<?php echo $key; ?>'>
													<?php echo $val; ?>
												</option>
												<?php endforeach; ?>
											</select>
										</div>
									</td>
									<td><a id="edit_birthday" class='edit' href='#'>Edit</a> <a
										id="update_birthday" class="update" href="#"
										style='display: none;'>Update</a>
									</td>
								</tr>
								<tr>
									<td><input type='button' value='View other users'
										id='view_other' name='view_other' />
									</td>
									<td><a href='index.php?c=listfrends'>List friends</a><br /> <a
										id='add_friend' href='#'>Add friend</a> <a id='friend'
										href='#'>Friends</a>
									</td>
								</tr>
							</table>
						</div>
						<div id="tabs">
							<ul>
								<li><a href="index.php?c=index&m=introduction">Introduction</a>
								</li>
								<li><a href="index.php?c=index&m=picture">Picture</a></li>
								<li><a href="index.php?c=index&m=contact">Contact</a></li>
								<li><a href="index.php?c=index&m=statitics">Statictics</a></li>
							</ul>
						</div>
					</div>
				</div>
				<!--<div class="right"></div>-->
			</div>
		</div>
		<form id="update_form" name="update_form" action=""
			style="display: none;">
			<input type='text' value="" id="" name="" /> <input type="hidden"
				id="token" name="token" value="<?php echo $this->_token; ?>" />
		</form>

</body>
</html>
